﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="Web.login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Asset Point[:Login:]</title>
    <link href="contents/css/Style.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="spt_Manager" runat="server" />
        <script type="text/javascript" language="javascript">
            // debugger;
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            function BeginRequestHandler(sender, args) {
                var elem = args.get_postBackElement();
                //ActivateAlertDiv('visible', 'opacityDiv', '');
                var pleaseWait = 'กรุณารอสักครู่...';
                ActivateAlertDiv('visible', 'opacityDiv', '<div class="opacity"><table style="width: 100%;height: 100%;" ><tr><td style="width: 100%;height: 100%;text-align: center;vertical-align: middle;" ><div class="opacity-center">' + pleaseWait + '</div></td></tr></table></div>');
            }
            function EndRequestHandler(sender, args) {
                //ActivateAlertDiv('hidden', 'opacityDiv', '');
                ActivateAlertDiv('hidden', 'opacityDiv', '');
            }
            function ActivateAlertDiv(visstring, elem, msg) {
                var adiv = $get(elem);
                adiv.style.visibility = visstring;
                adiv.innerHTML = msg;
            }
        </script>
         <div id="opacityDiv" class="ToogleStyle">
        </div>
        <asp:UpdatePanel ID="upl" UpdateMode="Conditional"  runat="server">
            <ContentTemplate>
        <div style="width: 100%;height: 100%;">
        <div style="width: 100%; height: 60%;margin-top: 20%;margin-left: 15%;">
            <table>
                <tr>
                    <td style="width:25%;"></td>
                    <td style="width:50%;">
                        <table style="width: 100%; background-color: #708090;" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:Image ImageUrl="images/imgLoginPage.png" BorderWidth="0" runat="server" />
                                </td>
                                <td style="width: 100%; text-align: center; vertical-align: middle">
                                    <table>
                                        <tr>
                                            <td style="text-align: right; vertical-align: middle">
                                                <span class="field-validation-error">*</span><asp:Label ID="lbUser" runat="server" CssClass="label" Text="ชื่อล็อกอิน"></asp:Label>
                                                :
                                            </td>
                                            <td style="text-align: left; vertical-align: middle">
                                                <asp:TextBox ID="txUsername" CssClass="textbox" MaxLength="20" runat="server"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right; vertical-align: middle">
                                                <span class="field-validation-error">*</span><asp:Label ID="lbPassword" runat="server" CssClass="label" Text="รหัสผ่าน"></asp:Label>
                                                :</td>
                                            <td style="text-align: left; vertical-align: middle">
                                                <asp:TextBox ID="txPassword" CssClass="textbox" TextMode="Password" MaxLength="20" runat="server"></asp:TextBox></td>
                                        </tr>

                                        <tr>
                                            <td style="text-align: right; vertical-align: middle"></td>
                                            <td style="text-align: left; vertical-align: middle">
                                                <asp:Button ID="btnLogin" CssClass="access" runat="server" Text="เข้าสู่ระบบ" Style="margin-left: 0; background-image: url('../images/true.png'); background-repeat: no-repeat;" Width="100px" Font-Overline="False" OnClick="btnLogin_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><br />
                                    <asp:HyperLink ID="hpkForgat" CssClass="label HyperLink" runat="server">หากท่านลืมรหัสผ่าน</asp:HyperLink> &nbsp;
                                    <asp:HyperLink ID="hpkRegister" CssClass="label HyperLink" NavigateUrl="register.aspx" runat="server">เพื่อสมัครสมาชิกใหม่</asp:HyperLink>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="width:25%;"></td>
                </tr>
            </table>
        </div>
        </div>
                
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
